Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid going past end of ruleset/etag arrays #468

Merged
merged 1 commit into from
Nov 16, 2018
Merged

Avoid going past end of ruleset/etag arrays #468

merged 1 commit into from
Nov 16, 2018

Conversation

mstemm
Copy link
Contributor

@mstemm mstemm commented Nov 15, 2018

It's possible to call event_tags_for_ruleset/evttypes_for_ruleset for a
ruleset that hasn't been loaded. In this case, it's possible to go past
the end of the m_rulesets array.

After fixing that, it's also possible to go past the end of the
event_tags array in event_tags_for_ruleset().

So in both cases, check the index against the array size before
indexing.

It's possible to call event_tags_for_ruleset/evttypes_for_ruleset for a
ruleset that hasn't been loaded. In this case, it's possible to go past
the end of the m_rulesets array.

After fixing that, it's also possible to go past the end of the
event_tags array in event_tags_for_ruleset().

So in both cases, check the index against the array size before
indexing.
@mstemm
Copy link
Contributor Author

mstemm commented Nov 15, 2018

This fixes #469.

@mstemm mstemm merged commit d1329af into dev Nov 16, 2018
@mstemm mstemm deleted the robust-rulesets branch November 16, 2018 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant